//
//  CellForVideoCollect.m
//  世界
//
//  Created by admin on 16/3/1.
//  Copyright © 2016年 admin. All rights reserved.
//

#import "CellForVideoCollect.h"

@interface CellForVideoCollect ()

@property (nonatomic, retain) UIImageView *imgViewForPlay;
@property (nonatomic, retain) UIView *viewForSeparator;

@end

@implementation CellForVideoCollect


#pragma mark 重写初始化化方法
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self != nil)
    {
        self.viewForSeparator = [[UIView alloc] init];
        
        [self.contentView addSubview:self.viewForSeparator];
        
        self.viewForSeparator.backgroundColor = [UIColor lightGrayColor];
        
        self.viewForSeparator.alpha = 0.4;
        
        self.viewForSeparator.layer.cornerRadius = 2.5;
        
        self.viewForSeparator.layer.masksToBounds = YES;
        
        [_viewForSeparator release];
        
        
        
        
        self.imgView = [[UIImageView alloc] init];
        
        [self.contentView addSubview:self.imgView];
        
        self.imgView.layer.masksToBounds = YES;
        
        self.imgView.layer.cornerRadius = 12;
        
        [_imgView release];
        
        
        
        
        self.lableForTitle = [[UILabel alloc] init];
        
        [self.contentView addSubview:self.lableForTitle];
        
        //[self.lableForTitle setFont:[UIFont fontWithName:@"Helvetica-Bold" size:20]];
        
        [self.lableForTitle setFont:[UIFont systemFontOfSize:20]];
        
        [_lableForTitle release];
        
        
        
        
        
        
        self.imgViewForPlay = [[UIImageView alloc] init];
        
        [self.imgView addSubview:self.imgViewForPlay];
        
        self.imgViewForPlay.image = [UIImage imageNamed:@"播放"];
        
        [_imgViewForPlay release];
        
        
        
}
    return self;
}



#pragma mark 重写 布局子视图方法
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.viewForSeparator.frame = CGRectMake(0, 0, self.contentView.frame.size.width, 5);
    
    self.lableForTitle.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 10, 25);
    
    self.imgView.frame = CGRectMake(10, 10 + 25 + 5, self.contentView.frame.size.width - 20, 200);
    
    self.imgViewForPlay.frame = CGRectMake(207 - 30, 150 - 80, 50, 50);
}


- (void)awakeFromNib
{
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
